package com.jack.payment.entity.filter;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 其他筛选
 */
public class RestFilter {

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Schema(description = "附加数据: 如 h5 game, api 游戏模板")
    public static class AttachFilter extends  CommonPaging implements Serializable {
        @Schema(description = "表名")
        private String table;
        @Schema(description = "名称")
        private String name;
        @Schema(description = "种类")
        private String category;


    }


    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Schema(description = "文案筛选")
    public static class OfficialFilter extends CommonPaging implements Serializable {
        @Schema(description = "类别")
        private Integer type;
        @Schema(description = "名称")
        private String name;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Schema(description = "筛选队列日志")
    public static class QueueFilter extends CommonPaging implements Serializable {
        @Schema(description = "表名")
        @NotBlank(message = "基础表名不能为空")
        private String dbName;
        @Schema(description = "是否为手动")
        private Integer isManual;
        @Schema(description = "主题")
        private Integer subject;
        @Schema(description = "状态")
        private Integer status;
        @Schema(description = "search")
        private String search;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Schema(name = "请求日志筛选")
    public static class RequestLogFilter extends  CommonPaging implements Serializable {
        @Schema(description = "软件版本")
        private String appVersion;
        @Schema(description = "请求类型 [0 : login, 1: ADMIN, 2: WEBHOOK, 3.API]")
        private Integer requestType;
        @Schema(description = "请求uri地址")
        private String uriPath;
        @Schema(description = "此次请求状态  [0: 失败 1:成功]")
        private Integer status;
        @Schema(description = "用户id")
        private String userId;
        @Schema(description = "设备号")
        private String deviceId;
        @Schema(description = "表名")
        private String dbName;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    @Schema(description = "首页等数据筛选")
    public static class HomeFilter extends CommonPaging implements Serializable {
        @Schema(description = "分组字段")
        private String groupColumn;
        @Schema(description = "函数名")
        private String functionName;
        @Schema(description = "筛选字段")
        private String filterColumn;
    }



}
